package com.codefactory.generator.param;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 项目基础配置
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProjectConf {
    public String projectBasePackage;
    public String packageName;
    public String templatePath;
    public String templateClassify;
    public String targetPath;
    public WritePathConf pathConf;
    public PackageConf packageConf;
    public String author;
    public String date;
    public JSONObject variables;

    public static ProjectConf create() {
        return new ProjectConf();
    }

    public void put(String key, Object value) {
        if (variables == null) variables = new JSONObject();
        variables.put(key, value);
    }
}
